import { useEffect, useState } from 'react'
import { getArticlesList, getArticleDetail } from '@/apis/article/'

const useChannel = () => {
  const [articleList, setArticleList] = useState([])
  useEffect(() => {
    const getList = async () => {
      const res = await getArticlesList()
      setArticleList(res.data.channels)
    }
    getList()
  }, [])
  return {
    articleList,
  }
}

export { useChannel }
